package com.input4hua.visitor;

import com.input4hua.visitor.element.Element;
import com.input4hua.visitor.element.ElementImp1;
import com.input4hua.visitor.element.ElementImp2;
import com.input4hua.visitor.visitor.IVisitor;
import com.input4hua.visitor.visitor.Visitor;

/**
 * Created by jiahua.hu on 2019/2/13.
 */
public class Main {
    public static void main(String[] args) {
        IVisitor visitor = new Visitor();

        Element el1 = new ElementImp1();
        el1.accept(visitor);

        Element el2 = new ElementImp2();
        el2.accept(visitor);
    }
}

